import { request } from "../request"

// 获取学校信息列表
export function getCampusList(page, pageSize, datas) {
  return request({
    url: '/api/campus/list/'+ page + "/"+ pageSize,
    method: 'POST',
    data: JSON.stringify(datas)
  })
}

// 添加校区信息
export function addCampus(datas) {
  return request({
    url: '/api/campus/adjuration',
    method: 'POST',
    data: JSON.stringify(datas)
  })
}

// 编辑/更新校区信息
export function editCampus(campusId, datas) {
  return request({
    url: '/api/campus/update/' + campusId,
    method: 'PUT',
    data: JSON.stringify(datas)
  })
}

// 删除校区信息
export function deleteCampus(campusId) {
  return request({
    url: '/api/campus/delete/' + campusId,
    method: 'DELETE',
  })
}

// 获取校区详细信息
export function getCampusInfo(campusId) {
  return request({
    url: '/api/campus/' + campusId,
    method: 'GET',
  })
}
